Repository navigation
fix(service-automation)!: the connector pull door refuses an input key its read action does not declare, as connector_action does - #34089
Conversation
…y its action does not declare Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…fusal in the mapping spec, the jobs guide and a semantic migration entry Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…input describe Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…ark-key pins Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
📓 Docs Drift CheckThis PR changes 2 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 597a3d66bf608760a926b179626ba73f1d44cf0b && git checkout 597a3d66bf608760a926b179626ba73f1d44cf0b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2539ad9860a3e43323fcf35ac80ffee47c8dec3e ef8a82372fe56fd9bfdbcab53c1cf22ca6e45219 && git checkout -B drift-repro 2539ad9860a3e43323fcf35ac80ffee47c8dec3e && git merge --no-ff ef8a82372fe56fd9bfdbcab53c1cf22ca6e45219
node scripts/docs-audit/affected-docs.mjs --json 2539ad9860a3e43323fcf35ac80ffee47c8dec3e
|
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 208c32c · 2026-11-15T21:05Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-15T21:12Z. First review of this head, taken on patrol as owed; claim: comment 6901351752. Independence: implemented in a zhuangjianguo lane (domain:server#5); neither dispatched nor implemented by os-tesla. ① Derived judgmentsRead: the whole diff from merge base
② Semver level
CI on this head: 68 check-runs, all completed: 58 success, 10 skipped, 0 failed, 0 running. The PASS below is not taken ahead of any running check. ③ Boundary flags
④ Design judgmentThe narrowing makes the published rule real rather than taking a capability away: No must-fix. S1 (should-fix) — A NEW mapping whose S2 (should-fix) — S3 (should-fix) — S4 (should-fix) — The changeset says an operation that "names no query parameter at all" refuses the watermark. That holds only when the operation declares some other parameter or a body. An operation with no parameter and no body has no N1 (nit) — When the only undeclared key is the watermark parameter, the refusal still says "remove it from connectorSource.input" before the watermark sentence corrects it. Skip the generic hint when every undeclared key is door-added, or lead with the watermark sentence. N2 (nit) — No pin asserts the generic hint sentence ("remove it from connectorSource.input, or declare it in the action"); dropping it turns nothing red. N3 (nit) — "then let the connector re-materialize" does not say how (republish the connector entry, or restart). N4 (nit) — The rule for Card acceptance: met. The door opts in with its own hint; the pin is flipped to Implemented-by: VERDICT: PASS |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Review claim (review-a, S3) · head 208c32c · 2026-11-15T21:59Z |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Review — PASSHead-sha: Contract face: this is a declared narrowing with The open point (dev report 6901990244): accepted as a stated deviation. A new mapping whose
Two ways to close the gap later, neither owed here:
What holds (rest of the diff)
Owed after landing (the record's should-fixes; the head does not move for them)
The area files the cards and names them in the PR's Acceptance notes. Gates: at review time 58 success, 10 skipped, none red, so every check is green. |
…r and no body is not judged until it gains one Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…torSource.input describe Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Contract review — deltaServed-tier: Read: The head S4 statusFixed in all four places.
No copy of either old sentence is left in the tree at the head. Sentences checked
FindingsNo must-fix. No should-fix. N1 (nit) — "declares any parameter" is still slightly wider than the generator. A parameter N2 (nit) — The new CONTROL pins the door's half (no The CONTROL pinIt asserts the right thing. Describe changeText only. The Gates68 check-runs on The prior record's S1, S2, S3 and N1–N4 are outside this delta and stand as written there. Implemented-by: VERDICT: PASS |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTjrNnh6b2BkCXFugM Review — PASS (delta)Head-sha: S4: fixed in all four places. The changeset, Nits (no re-review needed)
Gates: at review time 58 success, 10 skipped, none red, so every check is green. The PR can land. |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5 席位核对ACCEPT and landing · area S3 · 2026-11-16T00:02Z · head
Ready + auto-merge under the area S3 landing line (maintainer, project thread, 2026-11-15T11:06Z) and the pm-dispatch landing procedure (maintainer, 2026-11-15T15:56Z). Generated by Claude Code |
Requested by Steedos · project thread
Fixes #33894
Clause-②: no (narrowing) — a mapping whose
connectorSource.input, or the watermark parameter the pull adds to itsquery, carries a key the read action'sinputSchemadoes not declare used to pull and send that key to the provider; the pull now fails before the call withVALIDATION_ERROR. Nothing published widens: no export, no key, no option is added. First-party mappings affected: 0 (noconnectorSourceunderexamples/orpackages/apps/).Metadata-protocol: narrowed
Skills-docs: none —
git grep -i 'connectorSource|watermark' -- skills/has 0 hits: no published skill teaches the connector pull door's input维护者速读
connectorSource.input)也像connector_action节点一样,拒收读取动作inputSchema未声明的输入键,包括拉取入口自己加进query的水位参数(如since);拒绝时报VALIDATION_ERROR,点名该键和修法,不调用外部服务、不写入。sys_sync_run记 failed),直到映射或 OpenAPI 文档修好;水位参数只在目标已有值后才发送,所以首拉成功、第二次起失败。第一方受影响 0 处;rest 连接器的query是开放的,不受影响。回滚 = revert 本 PR。packages/services/service-automation/src/connector-pull.ts的判定段(打开refuseUndeclaredKeys,以及单独判定水位参数以便在拒绝句里点名它);connector-pull-undeclared-input-key.test.ts;changeset 的迁移说明。pnpm --filter @objectstack/service-automation exec vitest run src/connector-pull-undeclared-input-key.test.ts src/connector-pull.test.ts,预期全部通过(新文件 6 个用例,翻转后的拒绝 pin 在connector-pull.test.ts)。What changes
packages/services/service-automation/src/connector-pull.ts: the pull door judges the input it is about to send withjudgeConnectorInput(..., { refuseUndeclaredKeys: true }), asconnector_actiondoes (ruling 6896271476: every door that dispatches a connector action judges its input alike). The refusal keeps itsVALIDATION_ERROR400input_schema_mismatchenvelope and appends the pull door's own hint: remove the key fromconnectorSource.inputor declare it in the action (foropenapi, in the OpenAPI document). When the undeclared key is the watermark parameter the door added itself (judged alone against the schema, so the sentence never blames the watermark for an author's key), the refusal names it and says to declare it as anin: queryparameter of the operation.connector-pull.test.ts: the pin[#33553] an undeclared key is not refused here(formerly 385-398) is flipped in place to a refusal pin:code+status+reason, both undeclared keys named, handler never called, nothing written.connector-pull-undeclared-input-key.test.ts(named by the card): the door-added watermark key. An openapi-shaped operation that lists onlyquery.limit, and one that emits noquerysection, both refusesincenaming it and the OpenAPI fix; an author's stray key with the watermark declared does not mention the watermark. Controls: the declared watermark is sent; the first pull (nothing stored) sends no watermark and is not refused; arestconnector's openquerytakes the watermark as before.packages/spec/src/data/mapping.zod.ts(connectorSource.inputdescribe) and the generatedcontent/docs/references/data/mapping.mdx: input is judged before the call; an undeclared key is refused, the watermark parameter included.18.connector-pull-undeclared-input-key-refused(entry 18connector-action-undeclared-input-key-refused, shipped in 18.5.0, is not touched).content/docs/automation/jobs.mdx: theconnectorSourcerun bullet says the input is judged, names the watermark parameter and the OpenAPI fix, and that a scheduled run has nofaultedge, so the refusal fails every run until fixed.minoron@objectstack/service-automationand@objectstack/spec) with the ADR-0087 marker and the FROM → TO migration.For the sync-in owner (ADR-0153 D2, Proposed): when the pull door starts sending paging parameters (
connectorSource.paging), they are judged by this same rule, so the design now presumes the read action declares them; a paging parameter anopenapioperation does not list will be refused like the watermark.Tests
Touched-package suites and typecheck (head before the last main merge; re-run touched files on the final head where noted)
pnpm --filter @objectstack/service-automation test: Test Files 283 passed (283), Tests 4003 passed (4003).pnpm --filter @objectstack/service-automation typecheck(tsc + check:test-typecheck): exit 0 after typing the new file's handler (first run named TS2493 in the new file, fixed).pnpm --filter @objectstack/spec test: Test Files 842 passed (842), Tests 26961 passed, 1 todo;pnpm --filter @objectstack/spec typecheck: exit 0.pnpm --filter @objectstack/spec check:generated: 1 of 14 stale (check:docs), regenerated with--fix, committed.restconnector, service door): 64 passed.Ablations (each red, then restored with blob == HEAD and git diff HEAD empty)
{ refuseUndeclaredKeys: true }from the door's judge: 4 failed (the flipped pin and three new-file pins), "the pull must refuse, not resolve: expected undefined to be an instance of ConnectorPullError".addedUndeclared = false): 2 failed, "expected ... to contain 'watermark parameter 'since''".Acceptance notes
connector-input-schema.ts's header andConnectorInputJudgeOptions.refuseUndeclaredKeysdoc name only theconnector_actionnode as the door that opts in; they stay true but incomplete (outside the claim's file surface, left untouched).packages/spec/docs/SYNC_ARCHITECTURE.mdsays the pull judges required parameters and types "as aconnector_actionflow node's is"; it does not list the undeclared-key refusal (outside the claim's file surface).connectorSource.input) is unchanged."; released text, true when shipped, superseded by this changeset; not edited here.Verification
git merge-tree --write-tree --name-onlyagainst origin/main and the two PRs that add sibling files inentries/semantic/(fix(runtime): a channel list with a member off the declared shape is not judged at the automation save doors #33970, feat(spec)!: the AI-door confirmation rule binds every AI door, the in-app assistant included #34001): exit 0, no conflicted paths.Generated by Claude Code
🤖 Generated with Claude Code